<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		
		
		
	</head>
	<body>
		
		
		
		
	</body>
	
	
	
	<script>
		
		
		
		
		
		
		function getjs(){
			var xhr = new XMLHttpRequest();
			xhr.timeout = 16000;
			xhr.responseType = "text";
			xhr.open('GET', "js/js.js", true);
			xhr.onload = function(){
				if(this.status == 200||this.status == 304){
			        var txt = this.responseText;
			        var scr = document.createElement("script");
			        scr.setAttribute("id", "js");
			        scr.innerHTML = txt;
			        document.querySelector("head").appendChild(scr);
			    }
			}
			xhr.send();
		}
		
		function getcss(){
			var xhr = new XMLHttpRequest();
			xhr.timeout = 16000;
			xhr.responseType = "text";
			xhr.open('GET', "css/test.css", true);
			xhr.onload = function(){
				if(this.status == 200||this.status == 304){
					console.log(xhr);
					console.log(xhr.responseText);
					
					var styel = document.createElement("style");
					styel.setAttribute("id", "test");
					styel.innerHTML = xhr.responseText;
					document.querySelector("head").appendChild(styel);
					
			    }
			}
			xhr.send();
		}
		
		function gethtml(){
			var xhr = new XMLHttpRequest();
			xhr.timeout = 16000;
			xhr.responseType = "text";
			xhr.open('GET', "html/html.html", true);
			xhr.onload = function(){
				if(this.status == 200||this.status == 304){
					console.log(xhr);
					console.log(xhr.responseText);
					
					document.querySelector("body").innerHTML = xhr.responseText;
					
			    }
			}
			xhr.send();
		}
		
		gethtml();
		getcss();
		getjs();
		
	</script>
	
</html>
